home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / dm3_src.zip / DMDATA.H < prev    next >
Text File  |  1989-12-28  |  24KB  |  417 lines

  1.  
  2. /* ************************************************************************* */
  3. /*                                                                           */
  4. /*               D O O R W A R E   D A T A   I N C L U D E S                 */
  5. /*                                                                           */
  6. /*                            For Mycrosoft C                                */
  7. /*                                                                           */
  8. /* ************************************************************************* */
  9.  
  10.  
  11.  
  12. /* ************************************************************************* */
  13. /*                            PROGRAM HISTORY                                */
  14. /* ************************************************************************* */
  15. /* 06/20/87     Version 1.00                                                 */
  16. /*                                                                           */
  17. /*                                                                           */
  18. /*                                                                           */
  19. /*                                                                           */
  20. /* ************************************************************************* */
  21.  
  22.  
  23.  
  24. /*
  25.  *
  26.  * Color Definitions
  27.  *
  28.  */
  29.  
  30. #define DAY_SECONDS     86400L
  31.  
  32. #define BLACK           0x00
  33. #define BLUE            0x01
  34. #define GREEN           0x02
  35. #define CYAN            0x03
  36. #define RED             0x04
  37. #define MAGENTA         0x05
  38. #define BROWN           0x06
  39. #define LIGHT_GREY      0x07
  40. #define DARK_GREY       0x08
  41. #define LIGHT_BLUE      0x09
  42. #define LIGHT_GREEN     0x0a
  43. #define LIGHT_CYAN      0x0b
  44. #define LIGHT_RED       0x0c
  45. #define LIGHT_MAGENTA   0x0d
  46. #define YELLOW          0x0e
  47. #define WHITE           0x0f
  48.  
  49.  
  50. /*
  51.  *
  52.  * File Access Definitions
  53.  *
  54.  */
  55.  
  56. struct  fs                                      /* FILE ACCESS INFORMATION   */
  57. {
  58.    char name[80];                               /* filename                  */
  59.    int  fh;                                     /* file handle               */
  60.    FILE *fd;                                    /* file descriptor           */
  61.    int  open_flag;                              /* open flag                 */
  62.    int  binary;                                 /* open in binary mode       */
  63.    int  hold_flag;                              /* previous open flag        */
  64.    int  hold_mode;                              /* previous text/binary      */
  65.    long hold_pos;                               /* previous position         */
  66. };
  67.  
  68. #define FS      struct  fs
  69.  
  70. #define FREAD           0
  71. #define FMODIFY         1
  72. #define FAPPEND         2
  73. #define FWRITE          3
  74.  
  75. #define FTEXT           0
  76. #define FBINARY         1
  77.  
  78. #define FNOCREATE       0
  79. #define FCREATE         1
  80.  
  81.  
  82. /*
  83.  *
  84.  * BBS Definitions
  85.  *
  86.  */
  87.  
  88. struct  bbs_node                                /* NODE INFORMATION          */
  89. {
  90.    char name[31];                               /* Last users name           */
  91.    char sysop_avail[2];                         /* SysOp available flag      */
  92.    char sysop_annoy[2];                         /* SysOp annoy flag          */
  93.    char sysop_next[2];                          /* SysOp next on system flag */
  94.    char line_printer[2];                        /* Line printer avail flag   */
  95.    char doors_avail[2];                         /* DOORS available flag      */
  96.    char eight_bits[2];                          /* Eight bit transmit flag   */
  97.    char baud_rate[2];                           /* Baud rate                 */
  98.    char upper_case[2];                          /* Upper case only flag      */
  99.    char reserve_1[5];                           /* Reserved                  */
  100.    char graphics_type[2];                       /* Graphics type flag        */
  101.    char sysop[2];                               /* User is SysOp flag        */
  102.    char active[1];                              /* Activity flag             */
  103.    char snoop[2];                               /* Snoop indicator           */
  104.    char baud_dial[2];                           /* Dialed in baud rate       */
  105.    char reserved_2[2];                          /* Reserved                  */
  106.    char login_time[6];                          /* Time logged onto system   */
  107.    char reserved_3[2];                          /* Reserved                  */
  108.    char private_door[2];                        /* Access to private DOOR    */
  109.    char transfer[2];                            /* Transfer function         */
  110.    char daily_exit_date[10];                    /* Last daily exit date      */
  111.    char daily_exit_time[5];                     /* Last daily exit time      */
  112.    char reliable[2];                            /* Reliable mode             */
  113.    char reserved_4[36];                         /* Reserved                  */
  114. };
  115.  
  116. struct  bbs_options                             /* USER OPTION INFORMATION   */
  117. {
  118.    int  logins;                                 /* Times logged on           */
  119.    int  last_msg;                               /* Last message read         */
  120.    char protocol[1];                            /* Transfer protocol         */
  121.    char graphics[1];                            /* Graphics mode             */
  122.    int  margins;                                /* Margin size               */
  123.    int  bit_flags;                              /* Access options            */
  124.    int  subscription;                           /* Date subscription started */
  125.    char page_length;                            /* Page length (binary)      */
  126.    char reserved[1];                            /* Reserved                  */
  127. };
  128.  
  129. #define BBS_OPTION_BIT_15       0x8000
  130. #define BBS_OPTION_BIT_14       0x4000
  131. #define BBS_OPTION_BIT_13       0x2000
  132. #define BBS_OPTION_BIT_12       0x1000
  133. #define BBS_OPTION_BIT_11       0x0800
  134. #define BBS_OPTION_BIT_10       0x0400
  135. #define BBS_OPTION_BIT_9        0x0200
  136. #define BBS_OPTION_QUESTIONARE  0x0100
  137. #define BBS_OPTION_AUTODOWN     0x0080
  138. #define BBS_OPTION_FILES        0x0040
  139. #define BBS_OPTION_BULLETINS    0x0020
  140. #define BBS_OPTION_LF           0x0010
  141. #define BBS_OPTION_CASE         0x0008
  142. #define BBS_OPTION_NULLS        0x0004
  143. #define BBS_OPTION_EXPERT       0x0002
  144. #define BBS_OPTION_BELL         0x0001
  145.  
  146. struct  bbs_user                                /* USER INFORMATION          */
  147. {
  148.    char name[31];                               /* Users name                */
  149.    char password[15];                           /* Users password            */
  150.    int  security;                               /* Security level            */
  151.    struct bbs_options options;                  /* User options              */
  152.    char residence[24];                          /* City and state            */
  153.    char reserved[19];                           /* Reserved                  */
  154.    char last_on[14];                            /* Date & time last on       */
  155.    char last_dir[3];                            /* Date last listed directory*/
  156.    int  downloads;                              /* Total downloads           */
  157.    int  uploads;                                /* Total uploads             */
  158.    int  elapsed;                                /* Elapsed time user was on  */
  159. };
  160.  
  161.  
  162. /* RBBS 16 User information                                                  */
  163.    /* Line  1 --> Name of RBBS system                                        */
  164.    /* Line  2 --> SysOps first name                                          */
  165.    /* Line  3 --> SysOps last name                                           */
  166.    /* Line  4 --> Comm port name                                             */
  167.    /* Line  5 --> Comm port parameters                                       */
  168.    /* Line  6 --> Network type                                               */
  169.    /* Line  7 --> Users first name                                           */
  170.    /* Line  8 --> Users last name                                            */
  171.    /* Line  9 --> Users city/state                                           */
  172.    /* Line 10 --> Graphics                                                   */
  173.    /* Line 11 --> Security level                                             */
  174.    /* Line 12 --> Time remaining in minutes                                  */
  175.  
  176.  
  177. struct  pcbbs_data                              /* PC-BOARD 12.1 INFORMATION */
  178. {
  179.    char display[2];                             /* Display On/Off (-1/0)     */
  180.    char printer[2];                             /* Printer On/Off (-1/0)     */
  181.    char page_bell[2];                           /* Page Bell On/Off (-1/0)   */
  182.    char caller_alarm[2];                        /* Caller Alarm On/Off (-1/0)*/
  183.    char sysop_next[2];                          /* Sysop Next-On Flag        */
  184.    char bps[4];                                 /* CONNECT bps rate of caller*/
  185.    char name[27];                               /* Name of caller plus 2 spcs*/
  186.    char first[15];                              /* Callers first name padded */
  187.    char graphics[2];                            /* Graphics Mode (-1/0)      */
  188.    char password[12];                           /* Password of caller        */
  189.    int  user_index;                             /* User's Record # in DBase  */
  190.    long connect_time;                           /* Time logged on in seconds */
  191.    long max_time;                               /* Allowed time in seconds   */
  192.    long door_time;                              /* Time Exited to DOOR in sec*/
  193.    char logon[5];                               /* Time logged on (hh:mm)    */
  194.    int  conference;                             /* Confer. exited to DOS from*/
  195.    int  conf_flags;                             /* Conf. 1-9 "joined flags"  */
  196.    int  conf_time;                              /* Conference Time Add       */
  197.    char dload_limit[8];                         /* Daily Download Byte Limit */
  198.    int  uload_credit;                           /* Upload time credit        */
  199.    char language[4];                            /* Language beging used      */
  200.    char ecr_modem[2];                           /* Error Corr. Modem (-1/0)  */
  201.    char chat;                                   /* Last Node CHAT Flag Status*/
  202. };
  203.  
  204.  
  205. struct  pcbbs2_data                             /* PC-BOARD 14.0 INFORMATION */
  206. {
  207.    char display[2];                             /* Display On/Off (-1/0)     */
  208.    char printer[2];                             /* Printer On/Off (-1/0)     */
  209.    char page_bell[2];                           /* Page Bell On/Off (-1/0)   */
  210.    char caller_alarm[2];                        /* Caller Alarm On/Off (-1/0)*/
  211.    char sysop_next;                             /* Sysop Next-On Flag (Y/ )  */
  212.    char ecr_modem[2];                           /* Error Corr. Modem (-1/0)  */
  213.    char graphics;                               /* Graphics Mode (Y/ )       */
  214.    char chat;                                   /* Last Node CHAT Flag Status*/
  215.    char bps_open[5];                            /* OPEN bps rate of caller   */
  216.    char bps[5];                                 /* CONNECT bps rate of caller*/
  217.    int  user_index;                             /* User's Record # in DBase  */
  218.    char first[15];                              /* Callers first name padded */
  219.    char password[12];                           /* Password of caller        */
  220.    long connect_time;                           /* Time logged on in secs    */
  221.    char logon[5];                               /* Time logged on (hh:mm)    */
  222.    int  max_time;                               /* Daily time limit in mins  */
  223.    int  dload_limit;                            /* Daily Download Byte Limit */
  224.    char conference;                             /* Confer. exited to DOS from*/
  225.    char conf_flags[5];                          /* Conf. 1-9 "joined flags"  */
  226.    char conf_scans[5];                          /* Conf. 1-9 "scanned flags" */
  227.    int  conf_time;                              /* Conference Time Add       */
  228.    int  uload_credit;                           /* Upload time credit        */
  229.    char language[4];                            /* Language beging used      */
  230.    char name[25];                               /* Name of caller plus 2 spcs*/
  231.    int  time_left;                              /* Session time remaining    */
  232.    char node;                                   /* Node id                   */
  233.    char event_time[5];                          /* Next event time           */
  234.    char event_flag[2];                          /* Event active flag         */
  235.    char event_move[2];                          /* Delay event till logoff?  */
  236.    long msg_memory;                             /* Memorized message number  */
  237.    char comm_port;                              /* Comm port number          */
  238.    char reserved[2];                            /* Reserved for future use   */
  239. };
  240.  
  241.  
  242. /* Wildcat user information                                                  */
  243.    /* Line  1 --> User name                                                  */
  244.    /* Line  2 --> baud rate 0=2400,1=300,2=1200,3=9600                       */
  245.    /* Line  3 --> User city and state                                        */
  246.    /* Line  4 --> User Access level                                          */
  247.    /* Line  5 --> Logon time left in minutes                                 */
  248.    /* Line  6 --> Either COLOR or MONO user setting                          */
  249.    /* Line  7 --> User password                                              */
  250.    /* Line  8 --> User Record number                                         */
  251.    /* Line  9 --> Total minutes lon on bbs                                   */
  252.    /* Line 10 --> Time entered door hh:mm                                    */
  253.    /* Line 11 --> Time called bbs hh:mm                                      */
  254.    /* Line 12 --> User confernces join                                       */
  255.    /* Line 13 --> User daily d/l total                                       */
  256.    /* Line 14 --> User max d/l per day                                       */
  257.    /* Line 15 --> User daily d/l no of bytes in k                            */
  258.    /* Line 16 --> User max d/l in k                                          */
  259.    /* Line 17 --> User phone number                                          */
  260.    /* Line 18 --> Time / date last call                                      */
  261.    /* Line 19 --> Either NOVICE or EXPERT - user mode                        */
  262.    /* Line 20 --> N=none, X=Xmodem, C=Xmodem/crc etc                         */
  263.    /* Line 21 --> Last new file search MM/DD/YY                              */
  264.    /* Line 22 --> User total number of call                                  */
  265.    /* Line 23 --> User line per page or screen                               */
  266.    /* Line 24 --> Last msg no read                                           */
  267.    /* Line 25 --> User total u/l since first log-on                          */
  268.    /* Line 26 --> User total d/l since first log-on                          */
  269.    /* Line 27 --> Either 7  {Databits} or 8  {Databits}                      */
  270.    /* Line 28 --> Either LOCAL or REMOTE                                     */
  271.  
  272.  
  273. /* GAP BBS user information                                                  */
  274.      /* Line  1 --> Comm port (COM0 = local)                                 */
  275.      /* Line  2 --> baud rate 300 - 3800                                     */
  276.      /* Line  3 --> Parity 7 - 8                                             */
  277.      /* Line  4 --> Node number 1 - 99                                       */
  278.      /* Line  5 --> Host modem locked flag Y - N                             */
  279.      /* Line  6 --> Screen display Y - N                                     */
  280.      /* Line  7 --> Printer toggle Y - N                                     */
  281.      /* Line  8 --> Page bell Y - N                                          */
  282.      /* Line  9 --> Caller alarm Y - N                                       */
  283.      /* Line 10 --> User full name                                           */
  284.      /* Line 11 --> User city and state                                      */
  285.      /* Line 12 --> Home phone number                                        */
  286.      /* Line 13 --> Work/data phone number                                   */
  287.      /* Line 14 --> User password                                            */
  288.      /* Line 15 --> User security level                                      */
  289.      /* Line 16 --> Total times on BBS                                       */
  290.      /* Line 17 --> Last date user called BBS                                */
  291.      /* Line 18 --> Seconds remaining this call                              */
  292.      /* Line 19 --> Minutes remaining this call                              */
  293.      /* Line 20 --> Graphics mode GR, NG, 7E                                 */
  294.      /* Line 21 --> Page length                                              */
  295.      /* Line 22 --> User expert flag Y - N                                   */
  296.      /* Line 23 --> Conferences registered in                                */
  297.      /* Line 24 --> Conference exited door from                              */
  298.      /* Line 25 --> User expiration date                                     */
  299.      /* Line 26 --> Users file record number                                 */
  300.      /* Line 27 --> Default xfer protocol                                    */
  301.      /* Line 28 --> Total uploads                                            */
  302.      /* Line 29 --> Total downloads                                          */
  303.      /* Line 30 --> Daily download K total                                   */
  304.      /* Line 31 --> Daily download max K                                     */
  305.  
  306.  
  307. /* WWIV user information                                                     */
  308.    /* Line  1 --> User number                                                */
  309.    /* Line  2 --> Users alias                                                */
  310.    /* Line  3 --> Users real name                                            */
  311.    /* Line  4 --> Amateur radio callsign                                     */
  312.    /* Line  5 --> Age                                                        */
  313.    /* Line  6 --> Sex (M/F)                                                  */
  314.    /* Line  7 --> Gold (game credits)                                        */
  315.    /* Line  8 --> Last date on BBS                                           */
  316.    /* Line  9 --> Width of screen                                            */
  317.    /* Line 10 --> Lines in screen                                            */
  318.    /* Line 11 --> Security level                                             */
  319.    /* Line 12 --> SysOp flag                                                 */
  320.    /* Line 13 --> Co-SysOp flag                                              */
  321.    /* Line 14 --> ANSI graphics flag                                         */
  322.    /* Line 15 --> Time remaining in seconds (float)                          */
  323.    /* Line 16 --> General text file directory                                */
  324.    /* Line 17 --> Data file directory                                        */
  325.    /* Line 18 --> Path/Filename for text sysop log                           */
  326.    /* Line 19 --> Current baud rate (KB = local)                             */
  327.    /* Line 20 --> Comm port number                                           */
  328.  
  329.  
  330. struct  bbs_access                              /* TIME OPTION INFORMATION   */
  331. {
  332.    long start_time;                             /* Start of game period      */
  333.    int  levels[8];                              /* Play times per level      */
  334. };
  335.  
  336.  
  337. struct  bbs_time                                /* TIME OPTION INFORMATION   */
  338. {
  339.    long sysop_start;                            /* SysOp starting time       */
  340.    long sysop_stop;                             /* SysOp ending time         */
  341.    int  levels[8];                              /* Security levels           */
  342.    int  dayt[8];                                /* Daily time limits         */
  343.    int  dayg[8];                                /* Daily game limits         */
  344.    int  wait[8];                                /* Time between games        */
  345.    struct bbs_access    access[8];              /* Times for play            */
  346. };
  347.  
  348.  
  349. /*
  350.  *
  351.  * Global Data Section
  352.  *
  353.  */
  354.  
  355.  
  356. /* Remote User Data */
  357.  
  358. extern  FILE    *remote_io;                     /* Comm port stream          */
  359. extern  int     remote_user;                    /* Comm port number          */
  360.  
  361.  
  362. /* BBS Data */
  363.  
  364. extern  int     bbs_active;                     /* BBS active                */
  365. extern  char    bbs_dir[];                      /* BBS home directory        */
  366.  
  367. extern  struct  bbs_node        bbs_node_info;  /* BBS node information      */
  368. extern  struct  bbs_user        bbs_user_info;  /* BBS user information      */
  369. extern  struct  pcbbs_data      pcbbs_user_info;/* PCB12.1 user information  */
  370. extern  struct  pcbbs2_data     pcbbs2_user_info;/* PCB14.0 user information  */
  371. extern  char    ascii_user_info[35][128];       /* Wildcat user information  */
  372. extern  struct  bbs_time        bbs_time_info;  /* BBS time information      */
  373.  
  374.  
  375. /* Monitor Data */
  376.  
  377. extern  FILE    *mon_inp;                       /* Input parameters          */
  378. extern  FILE    *mon_out;                       /* Output parameters         */
  379. extern  int     mon_active;                     /* Monitor active            */
  380.  
  381. extern  long    mon_signoff;                    /* time to signoff at        */
  382. extern  int     mon_user;                       /* monitor user #            */
  383. extern  int     mon_points;                     /* current player score      */
  384. extern  int     mon_max_play;                   /* time to play in mins      */
  385. extern  int     mon_nulls;                      /* number of nulls required  */
  386. extern  int     mon_graphics;                   /* monitor graphics flag     */
  387. extern  char    mon_dir[40];                    /* monitor subdirectory      */
  388. extern  char    mon_sound[];                    /* monitor sound flag        */
  389.  
  390.  
  391. /* User Data */
  392.  
  393. extern  int     user_node;                      /* users node                */
  394. extern  char    user_name[32];                  /* users name                */
  395. extern  char    user_game_date[12];             /* last day user player      */
  396. extern  long    user_game_end;                  /* last time user played     */
  397. extern  long    user_day_time;                  /* time user played          */
  398. extern  int     user_day_games;                 /* games user played         */
  399. extern  long    user_start;                     /* time user started game    */
  400. extern  long    user_signon;                    /* time user signed on       */
  401. extern  long    user_signoff;                   /* time to signoff at        */
  402. extern  int     user_points;                    /* current player score      */
  403. extern  int     user_security;                  /* number of nulls required  */
  404. extern  int     user_nulls;                     /* number of nulls required  */
  405. extern  int     user_graphics;                  /* graphics flag             */
  406. extern  int     user_caps;                      /* caps only flag            */
  407. extern  int     user_page;                      /* user page length          */
  408. extern  int     user_access_level;              /* user game access level    */
  409.  
  410.  
  411. /* Global Buffers & Flags */
  412.  
  413. extern  char    dminbuff[];                     /* Line buffer               */
  414. extern  char    dmoutbuff[];                    /* Line buffer               */
  415.  
  416.  
  417.